With the Time Division Multiplexing (TDM), transmission of different data between multiple devices or multiple users is usually implemented via one shared link, in which data transmission is divided into several time slots, and each user or device occupies a different time slot, so that the maximum utilization efficiency of bandwidth may be implemented.
A typical use of TDM is directed to stream data transmission of different users. Specifically, in practice, different users, e.g., 12.2 k voice users, occupy different time slots during the data transmission, and transmitting and receiving at different time slots correspond to different data buffers, so that multiplexing and demultiplexing of data may be implemented.
However, on the other hand, for some situations, a TDM port device is needed to implement the point-to-point communication between two devices, to facilitate the rapid and direct exchange of internal data.
At present, TDM is widely used for stream data transmission, and a typical solution of the data transmission is that: different users are assigned to different time slots each of which corresponds to a certain buffer; when gaining an access to transmit data, a user writes the data into the buffer and notifies a link to transmit the user's data; a controller continually transmits the data at the corresponding time slot, and inserts idle data for transmission when the data transmission is completed and no further data is to be transmitted; the opposite end continually receives and inserts the data into the corresponding user buffer, and if receiving the idle data, the opposite end discards the idle data and ends receiving.
FIG. 1 is a schematic diagram of a system for transmitting data in a TDM mode.
As shown in FIG. 1, C1, C2, C3 and C4 represent 4 users that transmit data, respectively. D1, D2, D3 and D4 represent 4 users that receive data, respectively. C1, C2, C3 and C4 share one link, and transmit data 1, 2, 3 and 4, respectively. If detecting that the transmitting of certain data is completed, a transmitting device adds idle data at the end of the transmitted data, and a receiving device stops the receiving of the corresponding transmitted data when receiving the idle data.
In the prior art, a solution of TDM point-to-point is typically implemented with a transmitter end employing a ping-pong buffer mode and a receiver end employing a search mode. Specifically, an interruption is generated after transmission of data in a ping buffer is completed, and transmission of data in a pong buffer continues; at the same time, the data to be transmitted is put into the ping buffer in response to the interruption, and thus the ping and pong buffers transmit data alternately. If no further data is to be transmitted, the pong buffer inserts idle data at the end of the transmitted data. After receiving the idle data, the receiver end perceives that the receiving of data is completed and ends the receiving of data. Similarly, the receiver end employs ping and pong buffers to receive data, where the ping buffer searches for data, finds a specific frame header and receives data, and an interruption is generated after the ping buffer is full; the pong buffer continues to search for data, finds the specific frame header and receives the data, thus the ping and pong buffers receive the data alternately.
FIG. 2 is a schematic diagram of a process for transmitting data using ping and pong buffers in the TDM mode in the prior art.
As shown in FIG. 2, to transmit the combined small data, a transmitting device puts small data a, b and c into a ping buffer sequentially. If further data d and e need to be transmitted during the transmitting of data a, b and c, the remaining space of the ping buffer has to be filled with invalid data, and the data d and e are put into a pong buffer for transmitting, the remaining space of the pong buffer is also filled with invalid data, and idle data is inserted at the end of the transmitted data for transmitting together. A ping buffer of the receiving device searches for the frame header of the data, and starts to receive data a, b, and c and the invalid data. After the ping buffer is full, an interruption is provided for a pong buffer, which searches for the frame header of the data, starts to receive the data, and stops receiving the data when receiving the idle data.
During the transmitting of large data, the transmitting device puts data a into a ping buffer, and transmits the data after filling the remaining space of the ping buffer with invalid data, at this point, no further data is to be transmitted, and the transmitting device needs to fill a pong buffer with invalid data and transmit it together with an idle data inserted at the end of the transmitted data. A ping buffer of the receiving device searches for the frame header of the data and starts to receive data a and the invalid data, an interruption is provided for a pong buffer after the ping buffer is full, and the pong buffer receives the invalid data and stops receiving the data after receiving the idle data.
It can be seen from an online transmission state that a large amount of invalid data needs to be added during transmitting of either combined small data or large data.
In summary, in the prior art, during the point-to-point transmitting of data in the TDM mode, the ping and pong buffers are required to have a large space, and a large amount of invalid data needs to be added during the transmitting of data, thus the time delay of data transmission is increased and link resources are wasted; moreover, during the transmitting of data, the internal bus is always used to shift data, and thus an increased load capacity of the bus bandwidth is required.